all: dirs release.en\akelpad.exe

dirs:
	if not exist release.en md release.en

release.en\akelpad.exe: release.en\akelpad.obj release.en\edit.obj release.en\codepage.obj release.en\lang.obj release.en\akelpad.res
	link /SUBSYSTEM:WINDOWS release.en\akelpad.obj release.en\edit.obj release.en\codepage.obj release.en\lang.obj release.en\akelpad.res kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib comctl32.lib comdlg32.lib /OUT:release.en\akelpad.exe /FILEALIGN:512
	
release.en\akelpad.obj: akelpad.cpp akelpad.h edit.h codepage.h langpack.h
	cl /O1 /MD /c /DFOREIGN_BUILD akelpad.cpp /Forelease.en\akelpad.obj

release.en\edit.obj: edit.cpp akelpad.h edit.h codepage.h langpack.h
	cl /O1 /MD /c /DFOREIGN_BUILD edit.cpp /Forelease.en\edit.obj

release.en\codepage.obj: codepage.cpp akelpad.h edit.h codepage.h langpack.h
	cl /O1 /MD /c /DFOREIGN_BUILD codepage.cpp /Forelease.en\codepage.obj

release.en\lang.obj: lang_en.cpp langpack.h
	cl /O1 /MD /c lang_en.cpp /Forelease.en\lang.obj

release.en\akelpad.res: akelpad_en.rc
	rc /r /Forelease.en\akelpad.res akelpad_en.rc

clean:
	del /f /q release.en\*.*
	rmdir release.en
